<template>
    <div class="bbox">
        <div class="list" @click.stop="goToCourseDetail(item)" v-for="item in list" :key="item.id">
            <div class="left">
                <img :src="item.thumb" alt="" />
            </div>
            <div class="right">
                <div class="one">{{ item.title }}</div>
                <div class="tow">
                    <p>订阅时间1个月前</p>
                </div>
            </div>
        </div>
        <div class="drop">已经到底了</div>
    </div>
</template>

<script>
export default {
    props: ["list"],
    methods: {
        goToCourseDetail: function (item) {
            this.$router.push({
                path: "/vod/detail",
                query: {
                    id: item.id,
                },
            });
        },
    },
};
</script>

<style lang="less" scoped>
.bbox {
    padding: 15px;
    .list {
        width: 100%;
        display: flex;
        margin-bottom: 15px;
        .left {
            width: 120px;
            height: 90px;
            margin-right: 10px;
            img {
                width: 100%;
                height: 100%;
                border-radius: 5px;
            }
        }
        .right {
            flex: 1;
            display: flex;
            flex-wrap: wrap;
            padding-top: 5px;
            .one {
                width: 100%;
                height: 40px;
                font-size: 15px;
                margin-bottom: 15px;
                line-height: 20px;
                font-weight: 500;
            }
            .tow {
                width: 100%;
                display: flex;
                align-items: center;
                p {
                    flex: 1;
                    height: auto;
                }
                p:nth-child(1) {
                    font-size: 12px;
                    color: #999;
                }
                p:nth-child(2) {
                    text-align: right;
                    font-size: 18px;
                    line-height: 18px;
                    font-weight: 600;
                    color: #ff5858;
                    &.charge {
                        color: #52c41a;
                    }
                    span {
                        font-size: 14px;
                    }
                }
            }
        }
    }
    .drop {
        display: inline-block;
        width: 100%;
        text-align: center;
        color: #ccc;
        font-size: 14px;
        margin-top: 30px;
        margin-bottom: 30px;
    }
}
</style>
